<ul class="autocomplete_list">
  <% @references.each do |r| %>
      <% if r.class.to_s == "Institute" || r.class.to_s == "Bookshop" || r.class.to_s == "Publisher" || r.class.to_s == "Library" || r.class.to_s == "LibraryDepartment" || r.class.to_s == "BookshopDepartment" || r.class.to_s == "Publisher"%>
        <li class="autocomplete_item"><%=r.name%></li>
      <%  end %>
      <% if r.class.to_s == "People"%>
        <li class="autocomplete_item"><%="#{r.last_name}, #{r.first_name}"%></li>
      <%  end %>
  <% end %>
</ul>